Upload Operator Connect Numbers Patch

The Upload Operator Connect Numbers Patch request lets you update specific Operator Connect number properties and then asynchronously update the Microsoft platform. A workflow process is implemented to streamline the synchronization mechanism. This process groups numbers for each Microsoft tenant and processes each scope independently. A failure in the processing for one scope, for example, "Capabilities" does not cause a rollback for another scope, for example, "Configuration".

Backend Scopes: Live Platform processes each parameter in the request into one of the following scopes:
Capabilities: capabilities parameter that is processed using Microsoft tn-capability-update API.
Configuration: callingProfileId, locationId, usage, additionalUsages, allowedCustomerActions, routingOptions that is processed using Microsoft tn-update-orders API.
SbcScript: scriptTemplateId, scriptParameters. Executes a Handlebars script template on all SBC devices where the numbers are stored. Limit: 500 numbers per request in this scope.
Validation Rules: Synchronous checks before the workflow process commences. In the event where these checks fail, "400: Bad Request" is returned (scenarios are described in 400 Bad Request: Bad requests may include the following scenarios:).

Rate Limit

This request has a global rate limit of 300 calls per minute. Exceeding this limit will result in a HTTP 429: Too Many Requests error.

URI

Copy
{{baseUrl}}/api/v3/oc/numbers

HTTP Method

PATCH

Request Parameters

Parameter

Type

Description

msTenantId

string

Microsoft TenantId (Azure Tenant ID of the customer).

Request Body

Parameter

Type

Description

idempotencyKey

string

An idempotencyKey is used to enable safe retries to prevent sending duplication requests to Microsoft for update actions to the same number.

Same key + same payload → 202 with the original task ID (no new workflow is started).
Same key + different payload → 409 with errorCode: IDEMPOTENCY_CONFLICT.

ticket ID

Related Service Request ticket (see Managing Service Requests).

Ticket ID

numbers

list array

A list of telephone numbers including capabilities (add and remove).

Numbers list must include at least one entry.
Null entries are not allowed in the Numbers array.
No duplicate telephone numbers within the same request.
Numbers in the SBC script scope must be programmed on at least one SBC.
All numbers must exist in the acquired numbers inventory.
Phone numbers are validated according to the configuration of the customer Operator Settings on their Teams admin center. For example, if United Kingdom, France and Italy are configured then only phone numbers with Country codes for these countries can be uploaded, unless the "Geographic" option is configured above for the Type of Service.

Phone number validation rules are in accordance with E.164 format:

A + sign.
Country calling code (international).
Local area code.

Local telephone number or subscriber number.

It has the following structure: [+][country code][area code][subscriber number].

Example of a number with E.164 format in the United States

Telephone number: 415 123 1234

E.164 format number: +14151231234

Country code: +1
Area code: 415
Subscriber number: 1231234

Valid country code, per civic address and/or contact info of the given lead. See Country Dialing Codes.

capabilities

The list of added capabilities
The list of removed capabilities

Each Add/Remove Usage/Capability must include at least one item.

One of the following values with matching supported usages (see above) (configure bolded value):

InboundCalling
CallingUserAssignment
FirstPartyAppAssignment
ConferenceAssignment
OutboundCalling
CallingUserAssignment
FirstPartyAppAssignment
ConferenceAssignment
OCMobile
CallingUserAssignment
Mobile
CallingUserAssignment
FirstPartyAppAssignment

 

callingProfileId

string

The Id string for the Microsoft Operator Connect Calling Profile that is attached to the tenant service (see Get Calling Profiles). Each Calling Profile is mapped to an SBC trunk used to manage call functionality for tenant service.

locationId

string

Id of the site location (see Get Services Brief Details (V3)).

usage

integer

One of the following values (mapping to Teams admin center values is shown in parentheses):

CallingUserAssignment (User): Assign regular number directly to a user.
FirstPartyAppAssignment (Voice app): Assign Service number to an Auto-attendant or Call queue. This option can be used for uploading Toll-free numbers. For example, +18000900770. When configuring Toll-free numbers you must also configure the 'Displayed Country Code' location (see below).
ConferenceAssignment (Audio Conferencing): Assign number to an Audio conferencing bridge.
ThirdPartyAppAssignment: Assign Third-party applications to users to integrate and manage external applications, such as telephony services provided by third-party operators.

Verify that the 'ThirdPartyAppAssignment' value is supported on your Microsoft tenant.

additionalUsage

The list of added AdditionalUsage
The list of removed AdditionalUsage


Support for an Additional usage type. For example if you configure 'CallingUserAssignment' as the Usage, then you can choose 'Conference Assignment' or 'FirstPartyAppAssignment' for the Additional Usage.

Configuration of Additional usage requires workflow Version 3.

allowedCustomerActions

The integer value of allowed Customer actions
The integer value of removed Customer actions

For future use

routingOptions

The integer value of allowed routingOptions
The integer value of removed routingOptions

For future use

scriptTemplateId

integer

The unique id of the script. See SBC Template Scenarios for references to IDs for default SBC script templates. See M365 Template Scenarios for references to IDs for default M365 script templates.

This value is mandatory if you configure script parameters (see below).

scriptParameters refers to:

CustomVar.Variable<VariableSequenceNumber>

dictionary

where <VariableSequenceNumber> is the sequence in database that the variable is defined in the 'Customer variables' column for the script properties (see Customer Variables).

For example, when the following IP-PBX variables are defined in the database in the order: IPPBX-ProxyAddress, IPPBX-ProxyAddress-SIPPort, SIP-HostName then Custom variables should be defined as follows:

CustomVar.Variable1: <: IPPBX-ProxyAddress>
CustomVar.Variable2: < IPPBX-ProxyAddress-SIPPort>
CustomVar.Variable3: <SIP-HostName>

 

Custom variables can be defined to update specific parameters on the SBC device. These variables must be predefined in the UMP-365 database (see Customer Variables). Also verify that the custom variables notation has been added to the script (see parameter 'sbcOnboardingScript' above) that you are applying to the request.

There are three fields displayed in the schema additionalProp1-3, however there is no limitation for the number of variables that can be added.

additionalProp1

string

Custom Script variable argument. For example "CacProfile": "5 sessions"

additionalProp2

string

Custom Script argument. For example, ProxySet": "SIPTrunk",

additionalProp3

string

Custom Script argument. For example, "OnlinePstnGateway": "sandbox1.audiocodes.be"

Example Request Body

Copy
{
         
  "idempotencyKey": "r2c4d3d5-vbgt-6540-erfu-ef1234554380",
  "ticketId": "TICKET-001",
  "numbers": [
    {
      "telephoneNumber": "+61395557002",
      "callingProfileId": "fcdd70da-df67-4ac5-a9fa-5d69da190622",
      "capabilities": { "add": ["InboundCalling"], "remove": [] }
    },
    {
      "telephoneNumber": "+61395557004",
      "scriptTemplateId": 2020,
      "scriptParameters": { "ProxySet": "SIPTrunk" }
    }
  ]
}

202 Accepted Response

The initial response displays the Task Id.

Parameter

Type

Description

Task Id

string

The queued task Id that is generated for this action. You must run the Task request to retrieve the status of the action. See Task Status. Note that the wup string in the prefix is unique for this endpoint.

Copy
{
    "taskId": "wup_c14a0a55-fcc5-4598-b405-c978e7da1af4"
}

The execution of the request may take a few minutes. The status will progress from 'In Progress' to 'Completed Success'.

Copy
{
    "numbers": [
        {
            "number": "+61395557002",
            "status": "Submitted",
            "failures": null
        },
        {
            "number": "+61395557004",
            "status": "Pending",
            "failures": null
        }
    ],
    "id": "ocn_p_14ce135c-15f1-4ff2-be62-4760a7d30a2d",
    "status": "Queued",
    "executionMessages": [
        {
            "level": "User",
            "message": "Starting patch operation for 2 number(s) across 1 tenant(s)."
        },
        {
            "level": "Information",
            "message": "Started child workflow c6906169-c565-4b94-8a69-3ba618e9225c for tenant '3bc57cac-5794-457f-ad36-2c88cade9dbb'."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Locking 2 number(s) for exclusive access."
        },
        {
            "level": "User",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Acquired exclusive access to 2 number(s)."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Lock acquired."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Submitting capability update for 1 number(s)."
        },
        {
            "level": "User",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update submitted to Microsoft Operator Connect."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update order submitted (MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking capability update status (attempt 1/15, MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update in progress. Next check in 60s."
        }
    ],
    "outputData": {},
    "createTime": "2026-07-07T08:16:54.6103857Z"
}

 

Copy
{
    "numbers": [
        {
            "number": "+61395557002",
            "status": "Completed",
            "failures": null
        },
        {
            "number": "+61395557004",
            "status": "Completed",
            "failures": null
        }
    ],
    "id": "ocn_p_14ce135c-15f1-4ff2-be62-4760a7d30a2d",
    "status": "CompletedSuccess",
    "executionMessages": [
        {
            "level": "User",
            "message": "Starting patch operation for 2 number(s) across 1 tenant(s)."
        },
        {
            "level": "Information",
            "message": "Started child workflow c6906169-c565-4b94-8a69-3ba618e9225c for tenant '3bc57cac-5794-457f-ad36-2c88cade9dbb'."
        },
        {
            "level": "Information",
            "message": "Detected child c6906169-c565-4b94-8a69-3ba618e9225c completed (status=Complete); 1/1 done."
        },
        {
            "level": "User",
            "message": "Patch operation completed: 1 of 1 tenant(s) succeeded."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Locking 2 number(s) for exclusive access."
        },
        {
            "level": "User",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Acquired exclusive access to 2 number(s)."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Lock acquired."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Submitting capability update for 1 number(s)."
        },
        {
            "level": "User",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update submitted to Microsoft Operator Connect."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update order submitted (MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking capability update status (attempt 1/15, MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update in progress. Next check in 60s."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking capability update status (attempt 2/15, MS order: c6774da1-3227-4de5-ba33-cc099d2e0ed4)."
        },
        {
            "level": "User",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update confirmed by Microsoft."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Capability update completed successfully."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Submitting configuration update for 1 number(s)."
        },
        {
            "level": "User",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update submitted to Microsoft Operator Connect."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update order submitted (MS order: 138ddbfe-8d02-47bc-a6c1-ac3431c4619e)."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking configuration update status (attempt 1/15, MS order: 138ddbfe-8d02-47bc-a6c1-ac3431c4619e)."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update in progress. Next check in 60s."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Checking configuration update status (attempt 2/15, MS order: 138ddbfe-8d02-47bc-a6c1-ac3431c4619e)."
        },
        {
            "level": "User",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update confirmed by Microsoft."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Configuration update completed successfully."
        },
        {
            "level": "User",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Exclusive access released."
        },
        {
            "level": "Information",
            "message": "[Tenant: 3bc57cac-5794-457f-ad36-2c88cade9dbb] Lock released."
        }
    ],
    "outputData": {},
    "createTime": "2026-07-07T08:16:54.6103857Z",
    "completeTime": "2026-07-07T08:19:21.6337647Z"
}

HTTP Responses

200 OK

Parameter

Type

Description

id

string

Task Id

status

string

Task status is one of the following

In Progress
Completed Successful
Completed Failed

The cache mechanism used to Upload numbers is according to Distributed Cache.

details

string

One of the following values:

Numbers uploaded: Numbers uploaded successfully
InvalidTelephonesError: Numbers entered incorrectly
MsProgrammingError: Number could not be configured on Microsoft.

executionMessages

list array

This list array includes the following parameters:

level
message

level

string

One of the following values:

Information
Error

message

string

The following 'Information' messages may appear:

'Input is valid': Indicates that Telephone syntax entered is valid.
'Duplicates: <PhoneNumbers>': Indicates that phone number already exists in the database.
'All uploaded numbers are not present in Microsoft context': Numbers have not yet been updated on Microsoft.
Site found: The Live Platform IP Group link between Live Platform and SBC device has been found.
Number(s) accepted by Microsoft: Numbers are approved by Microsoft.
UploadToAccount job status:
In Progress
Success
Moving on: starting processing of next number.
Telephone numbers programmed in SBC and in Live Cloud database': Numbers have been updated on both SBC and Live Platform .
Workflow completed: End of upload process.

The following 'Error' messages may appear:

upload telephone numbers to Microsoft: Partner '{Microsoft Tenant Id}' does not support Offer Types [Calling] in country '{Country Abbreviation Code}': Region number that you are attempting to upload is not partnered with the operator (as configured in customer Teams admin center). For example, configured regions are Australia and Canada and you are attempting to upload an Italian number.

The following includes example error messages:

The number already exists in the database:
Copy
{
    "id": "wup_2bd5ed7d-7eb1-44b7-88cf-6be495ccd420",
    "status": "CompletedFailed",
    "details": [
        "InvalidTelephonesError"
    ],
    "executionMessages": [
        {
            "level": "Error",
            "message": "Duplicates: +97239764533"
        },
        {
            "level": "Information",
            "message": "Workflow completed."
        }
    ],
    "outputData": {
        "CreateTime": "2023-09-21T10:53:44.6292124Z",
        "CompleteTime": "2023-09-21T10:53:44.8276113Z",
        "OcUploadNumberResult": "InvalidTelephonesError",
        "WorkflowVersion": 3
    }
}
Invalid phone number syntax:
Copy
{
"callingProfile": "ab86ef82-ce9e-4ead-befb-4aa954b64872",
"usage": "CallingUserAssignment",
"additionalUsages": ["FirstPartyAppAssignment"],
"capabilities": ["InboundCalling", "OutboundCalling"],
"phoneNumberRanges": [

    {

      "start": "+448718943002",

      "end": "++448718943009"

    }

  ],
"workflowVersion": 3,
"country": "GB"
}
The telephone list array is empty:
Copy
{
    "id": "wup_9e7f5e3f-a51f-43aa-85c9-f7b9508b6924",
    "status": "CompletedFailed",
    "details": [
        "InvalidTelephonesError"
    ],
    "executionMessages": [
        {
            "level": "Error",
            "message": "No telephone numbers to validate."
        },
        {
            "level": "Information",
            "message": "Workflow completed."
        }
    ],
    "outputData": {
        "ocUploadNumberResult": "InvalidTelephonesError",
        "workflowVersion": 3,
        "msJobStatus": ""
    },
    "createTime": "2026-02-17T09:40:27.4969529Z",
    "completeTime": "2026-02-17T09:40:27.5430781Z"
}
A consented lead was generated and then an attempt was made to upload a number for a country that was not configured in the Offer Types in the customer Teams admin center.
Copy
{
    "id": "wup_7e3ca019-c34e-4ff7-883e-e592c54d2c03",
    "status": "CompletedFailed",
    "details": [
        "MsProgrammingError"
    ],
    "executionMessages": [
        {
            "level": "Information",
            "message": "Input is valid."
        },
        {
            "level": "Information",
            "message": "All uploaded numbers are not present in Microsoft context."
        },
        {
            "level": "Information",
            "message": "Site GRXRATNEUZMNZ found."
        },
        {
            "level": "Error",
            "message": "upload telephone numbers to Microsoft: Partner '7a4e58a1-8348-4fa5-8d36-4e19125e4ac3' does not support Offer Types [Calling] in country 'NL'."
        },
        {
            "level": "Information",
            "message": "Workflow completed."
        }
    ],
    "outputData": {
        "CreateTime": "2023-10-09T14:40:19.0541215Z",
        "CompleteTime": "2023-10-09T14:40:22.0420167Z",
        "OcUploadNumberResult": "MsProgrammingError",
        "WorkflowVersion": 3,
        "SbcIdList": [
            8
        ],
        "MsJobStatus": ""
    }
}
Attempt to upload a Toll-free number with the incorrect usage "CallingUserAssignment".
Copy
"usage": "CallingUserAssignment",
"capabilities": ["InboundCalling", "OutboundCalling"],
"phoneNumbers": ["+18000900790"],
"workflowVersion": "3",
"country": "US"
}
The Toll-free numbers is not configured with the usage 'FirstPartyAppAssignment'.
Copy
{
    "id": "wup_d62adf69-47c6-44bb-83e0-dfc632a2eca0",
    "status": "CompletedFailed",
    "details": [
        "MsProgrammingError"
    ],
    "executionMessages": [
        {
            "level": "Information",
            "message": "Input is valid."
        },
        {
            "level": "Information",
            "message": "All uploaded numbers are not present in Microsoft context."
        },
        {
            "level": "Information",
            "message": "Site GRYXIKLDOVPLU found."
        },
        {
            "level": "Error",
            "message": "upload telephone numbers to Microsoft: Plan/Usage 'Calling User Assignment' does not support Toll Free TNs upload."
        },
        {
            "level": "Information",
            "message": "Workflow completed."
        }
    ],
    "outputData": {
        "createTime": "2024-05-07T15:02:02.8461328Z",
        "completeTime": "2024-05-07T15:02:13.3898797Z",
        "ocUploadNumberResult": "MsProgrammingError",
        "workflowVersion": 3,
        "sbcIdList": [
            8
        ],
        "msJobStatus": ""
    },
    "createTime": "0001-01-01T00:00:00"
}
No Calling Trunks (SBC devices) are assigned to the Calling Profile and therefore you cannot make or receive calls to this number.
Copy
{
    "errors": {
        "CallingProfile": [
            "There are no SBCs assigned to this calling profile!"
        ]
    },
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "00-ce7db116205054eee1c59c80ebe7f48d-d5a3edc4aadfc80d-00"
}

outputData

List array

This array includes the following parameters:

CreateTime
CompleteTime
OcUploadNumberResult
NumbersUploaded
WorkflowVersion
SbcIdList
MsJobWhenUpdated
MsJobId
MsJobStatus

CreateTime

string($date-time)

Timestamp at the commencement of the number upload.

CompleteTime

string($date-time)

Timestamp at the completion of the number upload.

OcUploadNumberResult

string

One of the following values:

NumbersUploaded
InvalidTelephonesError
MsProgrammingError

WorkflowVersion

integer

Version of the Workflow API.

SbcIdList

integer

Id of the SBC device in the Live Platform database.

MsJobWhenUpdated

string($date-time)

Timestamp when the Microsoft tenant platform was updated with the new number.

MsJobId

string

Id of the job to update the Microsoft platform.

400 Bad Request: Bad requests may include the following scenarios:
The number list array is empty
Duplicate telephone numbers are specified in the list
The Add or Remove capability list array is empty
Numbers specified are not in the valid E.164 format
Numbers specified do not exist in the number inventory
Script parameters have been configured, however, a scriptTemplateId has not been configured
The specified scriptTemplateId does not exist
Numbers specified have not been configured on the SBC
The request exceeds 500 numbers
Copy
{
  "status": 400,
  "title": "Numbers Not Found",
  "errorCode": "NUMBERS_NOT_FOUND",
  "invalidNumbers": ["+14155559999"],
  "traceId": "00-abc123-def456-00"
}
409 Conflict:  
If any number in the batch has a pending operation in the same scope, the entire request is rejected. In this case, the following error is returned including a list array of the conflicting (locked) numbers.
Copy
{
  "status": 409,
  "title": "Concurrent Operation",
  "errorCode": "CONCURRENT_OPERATION",
  "lockedNumbers": ["+14155551234"],
  "traceId": "00-abc123-def456-00"
}
 If a previous SBC script scope failure arose on any number, this number is blocked from further PATCH operations until the following error is cleared:

NUMBER_IN_INFRASTRUCTURE_ERROR_STATE and an errorStateNumbers array.